package cn.idongjia.live.exception;

import cn.idongjia.exception.Result;
import cn.idongjia.exception.ResultCodes;

/**
 * 快速构建直播返回码类
 * Created by wuqiang on 16/4/11.
 */
public class LiveResult {

    public static Result getAuthFail(String msg, Object... args) {
        return new Result(ResultCodes.AUTH_LIVE_FAIL.getCode(),
                String.format(ResultCodes.AUTH_LIVE_FAIL.getMsg() + " " + msg, args));
    }

    public static Result getLiveError(String msg, Object... args) {
        return new Result(ResultCodes.LIVE_ERROR.getCode(),
                String.format(ResultCodes.LIVE_ERROR.getMsg() + " " + msg, args));
    }

    public static Result getAuctionError(String msg, Object... args) {
        return new Result(ResultCodes.LIVE_AUCTION_ERROR.getCode(),
                String.format(ResultCodes.LIVE_AUCTION_ERROR.getMsg() + " " + msg, args));
    }
}
